package com.xbongbong.pro.weblist.pojo.dto;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.pro.statistic.pojo.FiscalYearTimePojo;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * 工作报告
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/25 10:22
 * @since v1.0
 */
@Getter
@Setter
public class WorkReportStatisicAppDTO extends BaseDTO {
    private String pid;
    private Integer timeType;
    /**
     * 时间筛选参数
     */
    @Getter(onMethod_ = {@QueryIgnore})
    @NotNull(message = "{dto.msg.signInStatistic.timeFilter.NotNull}")
    private FiscalYearTimePojo timeFilter;
    @Range(min = 1,max = 3,message = "{dto.msg.workReportStatisic.reportType.Range}")
    private Integer reportType;
    private String treeType;
    private Integer page;
    private Integer pageSize = 15;

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize == null ? this.pageSize : pageSize;
    }
}
